Release 10.1A: OpenEdge Getting Started:
New and Revised Features
4GL Programming
Release 10.1A provides the following programming enhancements:
Passing temp-tables and ProDataSets as parameters
Normally, when you pass temp-table parameters from one routine to another, there are two temp-tables (one in each routine) and the data is copied from a temp-table in one routine to the temp-table in the other routine.
In Release 10.1A, you can pass temporary tables as parameters by reference between two routines using the
BY-REFERENCEkeyword. When you use theBY-REFERENCEkeyword, the called routine just refers to the temp-table in the calling routine. (This functionality was available to ProDataSets in earlier Version 10 releases.)In addition, there are two new keywords in this release that extend this parameter passing behavior for both temp-tables and ProDataSets:
REFERENCE-ONLY— If you want to avoid the instantiation of a temp-table or ProDataSet on one side of the call, use the newREFERENCE-ONLYkeyword when you define a static temp-table or ProDataSet. This allows the noninstantiated reference to be bound at run time to another routine’s table or ProDataSet. You normally would use this keyword so that, during parameter passing, the instantiated table is used instead of theREFERENCE-ONLYtable (see the following description ofBIND.)Note: When a call is between remote routines, the temp-table or ProDataSet parameter is copied since there is no way to share the caller and called temp-tables or ProDataSets.BIND— You can use the newBINDkeyword (instead ofBY-REFERENCE) when you pass a temp-table or ProDataSet parameter and you want to create a binding between the calling and called parameters and you want the binding of the parameters to last beyond the end of the called routine.For more information, see:
NUM-REFERENCES attribute
Release 10.1A includes a new
NUM-REFERENCESattribute for ProDataSets, temp-tables, and buffers. This attribute lets you check how many references still exist for an allocated ProDataSet, temp-table, or buffer. You can useNUM-REFERENCESto help determine whether it is safe to delete a ProDataSet, temp-table, or buffer, specifically in cases where it served as a reference object for some other procedure.For more information, see:
Batch-mode event support
Release 10.1A includes the following support for the developer events (U1–U10) when running an OpenEdge client in batch mode:
For more information, see:
Shorthand syntax for dynamic references
Release 10.1A includes support for a shorthand syntax that makes it easier and less cumbersome to write dynamic references to tables or fields within a dynamic ProDataSet, query, temp-table, or buffer. You can use this shorthand syntax when the field or table name you are referencing is known at compile time.
For more information, see:
UNDO of large objects in subtransactions
Subtransactions containing changes to large object (LOB) fields can be undone without undoing the entire transaction. This feature applies only to LOB operations in the OpenEdge database. The restrictions on LOB operations in subtransactions still applies to the Oracle DataServer.
Note also that this feature does not apply to temporary tables. Temp-tables should still remain
NO-UNDOif they contain binary (BLOB) or character large object (CLOB) fields.For more information, see:
DBTYPE evaluation by preprocessor
To provide support for a conditional compile of DataServer-specific code, the
DBTYPEfunction is now one of the functions that the preprocessor evaluates.The
DBTYPEfunction returns (as a character string) the database type of a currently connected database. Database types include: OpenEdge, ODBC, and ORACLE.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |